FVSDOF-SYS Example 2 - Natural period of spring max system

Consider a spring mass system with natural period of 0.45 [s]. Calculate the new period if a spring constant is icreased by 10, 50, 100, 200, 500\%. \begin{eqnarray} \tau_1 &=& 0.21 [s] = 2\pi \sqrt{\frac{m}{k}}\\ \tau_{10} &=& \frac{2\pi\sqrt{m}}{\sqrt{1.1k}} = \frac{2\pi\left(\frac{0.21\sqrt{k}}{2\pi}\right)}{\sqrt{1.1k}} = \frac{0.21\sqrt{k}}{\sqrt{1.1k}} = 0.20022714374157435[s] \end{eqnarray} \begin{eqnarray} \tau_{20} &=& \frac{2\pi\sqrt{m}}{\sqrt{1.5k}} = \frac{2\pi\left(\frac{0.21\sqrt{k}}{2\pi}\right)}{\sqrt{1.5k}} = \frac{0.21\sqrt{k}}{\sqrt{1.5k}} = 0.17146428199482247 [s] \end{eqnarray} \begin{eqnarray} \tau_{30} &=& \frac{2\pi\sqrt{m}}{\sqrt{2k}} = \frac{2\pi\left(\frac{0.21\sqrt{k}}{2\pi}\right)}{\sqrt{2k}} = \frac{0.21\sqrt{k}}{\sqrt{2k}} = 0.14849242404917495 [s] \end{eqnarray} \begin{eqnarray} \tau_{40} &=& \frac{2\pi\sqrt{m}}{\sqrt{3k}} = \frac{2\pi\left(\frac{0.21\sqrt{k}}{2\pi}\right)}{\sqrt{3k}} = \frac{0.21\sqrt{k}}{\sqrt{3k}} = 0.12124355652982141 [s] \end{eqnarray} \begin{eqnarray} \tau_{50} &=& \frac{2\pi\sqrt{m}}{\sqrt{5k}} = \frac{2\pi\left(\frac{0.21\sqrt{k}}{2\pi}\right)}{\sqrt{5k}} = \frac{0.21\sqrt{k}}{\sqrt{5k}} = 0.09391485505499116 [s] \end{eqnarray}

Solution in Pyhton

For this example we will also need two libraries matplotlib and numpy.
import numpy as np
import matplotlib.pyplot as plt
We have a constant value (natural period) that we will define as:
tau_0 = 0.21
Then we will define the increase of the spring constant or spring stiffness as list:
Spring_Const = [1.1, 1.5, 2, 3, 5]
Then we will define the empty list named tau_res.
tau_res = []
Now we will create a for loop that will calculate new natural period and store its value into the taur_res list.
for i in range(len(Spring_Const)): 
    res = tau_0/np.sqrt(Spring_Const[i])
    tau_res.append(res)
The np.sqrt is the square root function from the numpy library. Now we can plot results in which we will show how natural period changes versus spring constant inscrease:
plt.rcParams["font.family"] = "Times New Roman"
SMALL_SIZE = 20
MEDIUM_SIZE = 22
BIGGER_SIZE = 24
plt.rc('font', size=SMALL_SIZE) # controls default text sizes
plt.rc('axes', titlesize=SMALL_SIZE) # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE) # legend fontsize
plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title
SpringPER = [10,50,100,200,500]
plt.figure(figsize=(12,8))
plt.plot(SpringPER, tau_res)
plt.xlabel("Spring Constant Increase [%]")
plt.ylabel("Natural period [s]")
plt.grid(True)
plt.xlim(0,500)
plt.ylim(0,0.21)
plt.show()
2024-02-05T05:34:25.097148 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/
Figure 1 - The natural period versus spring constant increase.
As seen from Figure 1 as the spring constant or spring stiffness increases the natural period of the system decreases from initial 0.2002 up to 0.09 [s] when spring constant increased from 10 up to 500%.

Nema komentara:

Objavi komentar